'''
Created on Jun 9, 2012

@author: Timothy A. Mann
'''

import kryptos.cipher
import string

if __name__ == '__main__':
    text = 'This is a test. Will the test succeed or will the test fail?'.lower()
    
    shift = 10
    
    print 'Caesar Cipher Test'
    print '=================='
    print 'Plaintext  : ' + text
    ctext = kryptos.cipher.caesar_cipher(text, shift)
    print 'Ciphertext : ' + ctext
    print 'Plaintext  : ' + kryptos.cipher.caesar_cipher(ctext, len(string.lowercase) - shift)
    print ''
    print 'Mono Cipher Test'
    print '================='
    print 'Plaintext  : ' + text
    mkey = kryptos.cipher.generate_random_mono_key()
    ctext = kryptos.cipher.mono_cipher(text, mkey)
    print 'Ciphertext : ' + ctext
    rmkey = kryptos.cipher.reverse_mono_key(mkey)
    print 'Plaintext  : ' + kryptos.cipher.mono_cipher(ctext, rmkey)
    print ''
    print 'Vignere Cipher Test'
    print '================='
    print 'Plaintext  : ' + text
    vkey = 'xzamfw'
    ctext = kryptos.cipher.vignere_encipher(text, vkey)
    print 'Ciphertext : ' + ctext
    print 'Plaintext  : ' + kryptos.cipher.vignere_decipher(ctext, vkey)